include(../GSCommon.pri)
include(TcpServer/TcpServer.pri)
QT += core gui widgets network sql xml
greaterThan(QT_MAJOR_VERSION, 5): QT += core5compat
TARGET_BIN_PATH = $$clean_path($$IDE_APP_ROOT/bin)
LINK_LIBRARY_PATH = $$clean_path($$IDE_APP_ROOT/bin)
message("TARGET_BIN_PATH: "$$TARGET_BIN_PATH)
message("LINK_LIBRARY_PATH: "$$LINK_LIBRARY_PATH)

DESTDIR = $$TARGET_BIN_PATH

TARGET = GSRunner
TEMPLATE = app

# turn on console
CONFIG(debug, debug|release) { #debug
    CONFIG += console
    DEFINES += BUILD_BY_DEBUG
}


CONFIG -= app_bundle

QMAKE_CXXFLAGS += -std=c++17

#去除UNICODE字符编码
DEFINES -= UNICODE

INCLUDEPATH += \
    $$_PRO_FILE_PWD_ \
    Event \
    Log \
    Service \

LIBRARY_SRC_PATH = $$clean_path($$_PRO_FILE_PWD_)
message("LIBRARY_SRC_PATH: "$$LIBRARY_SRC_PATH)

INCLUDEPATH += \
    $$IDE_APP_ROOT/GSLibs/Core                      \
    $$IDE_APP_ROOT/GSLibs/shared                    \
    $$IDE_APP_ROOT/GSLibs/Core/qtsingleapplication  \
    $$IDE_APP_ROOT/GSLibs/Utils                     \
    $$IDE_APP_ROOT/GSDevice/DeviceCore              \
    $$LIBRARY_SRC_PATH/libs/edncrypt                \

LIB_SUFFIX=""
CONFIG(debug, debug|release) { #debug
    win32 {
        LIB_SUFFIX=d
    }
}

LIBS += -L$$LINK_LIBRARY_PATH -lUtils
LIBS += -L$$LINK_LIBRARY_PATH -ldevice_core
LIBS += -L$$LINK_LIBRARY_PATH -lcore
LIBS += -L$$LINK_LIBRARY_PATH -lshared



win32 {
    LIBS += -lpthread -lwsock32 -lws2_32
} else {

}

SOURCES += \
    Event/Event.cpp \
    DevRunner.cpp \
    MessageTransfer.cpp \
    TimerTask.cpp \
    keyboard.cpp \
    log/ulog.cpp \
    main.cpp \
    mainwindow.cpp \
    qbasedialog.cpp \
    qbasedialogwidget.cpp \
    qblinkwidgettimer.cpp \
    qrunningmanager.cpp


HEADERS  += \
    Event/Event.h \
    DevRunner.h \
    MainWindow.h \
    MessageTransfer.h \
    TimerTask.h \
    VersionInfo.h \
    keyboard.h \
    log/ulog.h \
    qbasedialog.h \
    qbasedialogwidget.h \
    qblinkwidgettimer.h \
    qcommonstruct.h \
    qrunningmanager.h


DISTFILES += \
    setting.ini

# copy config files to applicationDirPath
config.path = $$TARGET_BIN_PATH
config.files = ./*.ini
INSTALLS += config

FORMS += \
    keyboard.ui \
    mainwindow.ui

